\(\int \frac {\sqrt {a+b x} (A+B x)}{x^2} \, dx\) [393]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 71 \[ \int \frac {\sqrt {a+b x} (A+B x)}{x^2} \, dx=\frac {(A b+2 a B) \sqrt {a+b x}}{a}-\frac {A (a+b x)^{3/2}}{a x}-\frac {(A b+2 a B) \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \]

[Out]

-A*(b*x+a)^(3/2)/a/x-(A*b+2*B*a)*arctanh((b*x+a)^(1/2)/a^(1/2))/a^(1/2)+(A*b+2*B*a)*(b*x+a)^(1/2)/a

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {79, 52, 65, 214} \[ \int \frac {\sqrt {a+b x} (A+B x)}{x^2} \, dx=-\frac {(2 a B+A b) \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}}+\frac {\sqrt {a+b x} (2 a B+A b)}{a}-\frac {A (a+b x)^{3/2}}{a x} \]

[In]

Int[(Sqrt[a + b*x]*(A + B*x))/x^2,x]

[Out]

((A*b + 2*a*B)*Sqrt[a + b*x])/a - (A*(a + b*x)^(3/2))/(a*x) - ((A*b + 2*a*B)*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/S
qrt[a]

Rule 52

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[(a + b*x)^(m + 1)*((c + d*x)^n/(b*(
m + n + 1))), x] + Dist[n*((b*c - a*d)/(b*(m + n + 1))), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 65

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 79

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[(-(b*e - a*f
))*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(f*(p + 1)*(c*f - d*e))), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1
) + c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e,
f, n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || L
tQ[p, n]))))

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rubi steps \begin{align*} \text {integral}& = -\frac {A (a+b x)^{3/2}}{a x}+\frac {\left (\frac {A b}{2}+a B\right ) \int \frac {\sqrt {a+b x}}{x} \, dx}{a} \\ & = \frac {(A b+2 a B) \sqrt {a+b x}}{a}-\frac {A (a+b x)^{3/2}}{a x}+\frac {1}{2} (A b+2 a B) \int \frac {1}{x \sqrt {a+b x}} \, dx \\ & = \frac {(A b+2 a B) \sqrt {a+b x}}{a}-\frac {A (a+b x)^{3/2}}{a x}+\frac {(A b+2 a B) \text {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x}\right )}{b} \\ & = \frac {(A b+2 a B) \sqrt {a+b x}}{a}-\frac {A (a+b x)^{3/2}}{a x}-\frac {(A b+2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.09 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.75 \[ \int \frac {\sqrt {a+b x} (A+B x)}{x^2} \, dx=\frac {\sqrt {a+b x} (-A+2 B x)}{x}-\frac {(A b+2 a B) \text {arctanh}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{\sqrt {a}} \]

[In]

Integrate[(Sqrt[a + b*x]*(A + B*x))/x^2,x]

[Out]

(Sqrt[a + b*x]*(-A + 2*B*x))/x - ((A*b + 2*a*B)*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/Sqrt[a]

Maple [A] (verified)

Time = 0.52 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.69

method result size
pseudoelliptic \(-\frac {\left (A b +2 B a \right ) \operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right ) x +\sqrt {a}\, \sqrt {b x +a}\, \left (-2 B x +A \right )}{\sqrt {a}\, x}\) \(49\)
derivativedivides \(2 B \sqrt {b x +a}-\frac {A \sqrt {b x +a}}{x}-\frac {\left (A b +2 B a \right ) \operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )}{\sqrt {a}}\) \(50\)
default \(2 B \sqrt {b x +a}-\frac {A \sqrt {b x +a}}{x}-\frac {\left (A b +2 B a \right ) \operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )}{\sqrt {a}}\) \(50\)
risch \(2 B \sqrt {b x +a}-\frac {A \sqrt {b x +a}}{x}-\frac {\left (A b +2 B a \right ) \operatorname {arctanh}\left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )}{\sqrt {a}}\) \(50\)

[In]

int((B*x+A)*(b*x+a)^(1/2)/x^2,x,method=_RETURNVERBOSE)

[Out]

-((A*b+2*B*a)*arctanh((b*x+a)^(1/2)/a^(1/2))*x+a^(1/2)*(b*x+a)^(1/2)*(-2*B*x+A))/a^(1/2)/x

Fricas [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.75 \[ \int \frac {\sqrt {a+b x} (A+B x)}{x^2} \, dx=\left [\frac {{\left (2 \, B a + A b\right )} \sqrt {a} x \log \left (\frac {b x - 2 \, \sqrt {b x + a} \sqrt {a} + 2 \, a}{x}\right ) + 2 \, {\left (2 \, B a x - A a\right )} \sqrt {b x + a}}{2 \, a x}, \frac {{\left (2 \, B a + A b\right )} \sqrt {-a} x \arctan \left (\frac {\sqrt {b x + a} \sqrt {-a}}{a}\right ) + {\left (2 \, B a x - A a\right )} \sqrt {b x + a}}{a x}\right ] \]

[In]

integrate((B*x+A)*(b*x+a)^(1/2)/x^2,x, algorithm="fricas")

[Out]

[1/2*((2*B*a + A*b)*sqrt(a)*x*log((b*x - 2*sqrt(b*x + a)*sqrt(a) + 2*a)/x) + 2*(2*B*a*x - A*a)*sqrt(b*x + a))/
(a*x), ((2*B*a + A*b)*sqrt(-a)*x*arctan(sqrt(b*x + a)*sqrt(-a)/a) + (2*B*a*x - A*a)*sqrt(b*x + a))/(a*x)]

Sympy [A] (verification not implemented)

Time = 10.46 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.32 \[ \int \frac {\sqrt {a+b x} (A+B x)}{x^2} \, dx=- \frac {A \sqrt {b} \sqrt {\frac {a}{b x} + 1}}{\sqrt {x}} - \frac {A b \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} \sqrt {x}} \right )}}{\sqrt {a}} + B \left (\begin {cases} \frac {2 a \operatorname {atan}{\left (\frac {\sqrt {a + b x}}{\sqrt {- a}} \right )}}{\sqrt {- a}} + 2 \sqrt {a + b x} & \text {for}\: b \neq 0 \\\sqrt {a} \log {\left (x \right )} & \text {otherwise} \end {cases}\right ) \]

[In]

integrate((B*x+A)*(b*x+a)**(1/2)/x**2,x)

[Out]

-A*sqrt(b)*sqrt(a/(b*x) + 1)/sqrt(x) - A*b*asinh(sqrt(a)/(sqrt(b)*sqrt(x)))/sqrt(a) + B*Piecewise((2*a*atan(sq
rt(a + b*x)/sqrt(-a))/sqrt(-a) + 2*sqrt(a + b*x), Ne(b, 0)), (sqrt(a)*log(x), True))

Maxima [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.07 \[ \int \frac {\sqrt {a+b x} (A+B x)}{x^2} \, dx=\frac {1}{2} \, b {\left (\frac {4 \, \sqrt {b x + a} B}{b} + \frac {{\left (2 \, B a + A b\right )} \log \left (\frac {\sqrt {b x + a} - \sqrt {a}}{\sqrt {b x + a} + \sqrt {a}}\right )}{\sqrt {a} b} - \frac {2 \, \sqrt {b x + a} A}{b x}\right )} \]

[In]

integrate((B*x+A)*(b*x+a)^(1/2)/x^2,x, algorithm="maxima")

[Out]

1/2*b*(4*sqrt(b*x + a)*B/b + (2*B*a + A*b)*log((sqrt(b*x + a) - sqrt(a))/(sqrt(b*x + a) + sqrt(a)))/(sqrt(a)*b
) - 2*sqrt(b*x + a)*A/(b*x))

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.86 \[ \int \frac {\sqrt {a+b x} (A+B x)}{x^2} \, dx=\frac {2 \, \sqrt {b x + a} B b - \frac {\sqrt {b x + a} A b}{x} + \frac {{\left (2 \, B a b + A b^{2}\right )} \arctan \left (\frac {\sqrt {b x + a}}{\sqrt {-a}}\right )}{\sqrt {-a}}}{b} \]

[In]

integrate((B*x+A)*(b*x+a)^(1/2)/x^2,x, algorithm="giac")

[Out]

(2*sqrt(b*x + a)*B*b - sqrt(b*x + a)*A*b/x + (2*B*a*b + A*b^2)*arctan(sqrt(b*x + a)/sqrt(-a))/sqrt(-a))/b

Mupad [B] (verification not implemented)

Time = 0.45 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.69 \[ \int \frac {\sqrt {a+b x} (A+B x)}{x^2} \, dx=2\,B\,\sqrt {a+b\,x}-\frac {\mathrm {atanh}\left (\frac {\sqrt {a+b\,x}}{\sqrt {a}}\right )\,\left (A\,b+2\,B\,a\right )}{\sqrt {a}}-\frac {A\,\sqrt {a+b\,x}}{x} \]

[In]

int(((A + B*x)*(a + b*x)^(1/2))/x^2,x)

[Out]

2*B*(a + b*x)^(1/2) - (atanh((a + b*x)^(1/2)/a^(1/2))*(A*b + 2*B*a))/a^(1/2) - (A*(a + b*x)^(1/2))/x